package org.zebias.springcloudeurekaclient.service;

import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName SearchClientFallBackFactory
 * @Description 查询客户端回调工厂类
 * @Author zebias
 * @Date 2021/1/4 11:04
 * @Version 1.0
 **/
@Component
public class SearchClientFallBackFactory implements FallbackFactory<SearchClient> {

    @Autowired
    private SearchClientFallBack searchClientFallBack;
    @Override
    public SearchClient create(Throwable cause) {
        cause.fillInStackTrace();
        return searchClientFallBack;
    }
}
